package com.aracky.system.mapper;

import com.aracky.system.model.entity.SysUser;
import com.aracky.system.model.request.SysUserRequest;
import com.aracky.system.model.vo.SysUserVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户信息表 Mapper 接口
 * </p>
 *
 * @author zzp
 * @since 2022-07-14 11:22:57
 */
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {
    /**
     * 用户分页查询
     * @param toPage
     * @param sysUserRequest
     * @return
     */
    IPage<SysUserVO> findUser (Page toPage, @Param("user") SysUserRequest sysUserRequest);

    /**
     * 获取角色key
     * @param currentUserId
     * @return
     */
    List<String> findRoleKey(Long currentUserId);



}
